<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Sugar</title>
</head>

<body>
  <script>
    const fn = () => {
      console.log('普通函数');
      return 111;
    }
    const fnAsync = async () => {
      console.log('async函数');
      // 返回的是一个 Promise 对象，then() 内获取结果为 222
      return 222;
    }

    const res1 = fn();
    const res2 = fnAsync();

    console.log(res1);    // 111
    console.log(res2);    // Promise {<fulfilled>: 222}

    console.log(typeof fn);       // function
    console.log(typeof fnAsync);  // function

    console.dir(Object.prototype.toString.call(fn));      // [object Function]
    console.dir(Object.prototype.toString.call(fnAsync)); // [object AsyncFunction]
  </script>
</body>

</html>